from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
from .views import register, login_view, change_password, logout_view, user_management_view, vip_view

urlpatterns = [
    path('register/', register, name='register'),  # 用户注册
    path('login/', login_view, name='login'),  # 用户登录
    path('change-password/', change_password, name='change_password'),  # 修改密码
    path('logout/', logout_view, name='logout'),  # 注销
    path('management/', user_management_view, name='user_management'),  # 用户管理页面
    path('vip/', vip_view, name='vip_page'),  # 添加 VIP 页面路由
]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
